package JCT_Chapter_03;

public class Test_EnumTest {
    public static void main(String[] args) {
        EnumTest test = EnumTest.MON;
        System.out.println("test = " + test);
        System.out.println(test.compareTo(EnumTest.MON));
        switch(test.compareTo(EnumTest.MON)) {
            case -1:{
                System.out.println("TUE 在 MON之前。");
                break;
            }
            case 1:{
                System.out.println("TUE 在 MON之后。");
                break;
            }
            default:{
                System.out.println("TUE 与 MON在同一位置。");
                break;
            }
        }
        System.out.println("getDeclaringClass(); " + test.getDeclaringClass().getName());
        System.out.println("name();" + test.name());
        System.out.println("toString():" + test.toString());
        System.out.println("ordinal():" + test.ordinal());
        System.out.println("heart= " + test.getHeart());
        EnumTest.testEnum();
    }
 }
